{"ast":null,"code":"var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport Dialog from 'rc-dialog';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { NoFormStyle } from '../form/context';\nimport { NoCompactStyle } from '../space/Compact';\nimport { getTransitionName } from '../_util/motion';\nimport { canUseDocElement } from '../_util/styleChecker';\nimport warning from '../_util/warning';\nimport { renderCloseIcon, renderFooter } from './PurePanel';\nimport useStyle from './style';\nlet mousePosition;\n// ref: https://github.com/ant-design/ant-design/issues/15795\nconst getClickPosition = e => {\n  mousePosition = {\n    x: e.pageX,\n    y: e.pageY\n  };\n  // 100ms 内发生过点击事件，则从点击位置动画展示\n  // 否则直接 zoom 展示\n  // 这样可以兼容非点击方式展开\n  setTimeout(() => {\n    mousePosition = null;\n  }, 100);\n};\n// 只有点击事件支持从鼠标位置动画展开\nif (canUseDocElement()) {\n  document.documentElement.addEventListener('click', getClickPosition, true);\n}\nconst Modal = props => {\n  var _a;\n  const {\n    getPopupContainer: getContextPopupContainer,\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const handleCancel = e => {\n    const {\n      onCancel\n    } = props;\n    onCancel === null || onCancel === void 0 ? void 0 : onCancel(e);\n  };\n  const handleOk = e => {\n    const {\n      onOk\n    } = props;\n    onOk === null || onOk === void 0 ? void 0 : onOk(e);\n  };\n  process.env.NODE_ENV !== \"production\" ? warning(!('visible' in props), 'Modal', `\\`visible\\` will be removed in next major version, please use \\`open\\` instead.`) : void 0;\n  const {\n      prefixCls: customizePrefixCls,\n      className,\n      open,\n      wrapClassName,\n      centered,\n      getContainer,\n      closeIcon,\n      focusTriggerAfterClose = true,\n      // Deprecated\n      visible,\n      width = 520\n    } = props,\n    restProps = __rest(props, [\"prefixCls\", \"className\", \"open\", \"wrapClassName\", \"centered\", \"getContainer\", \"closeIcon\", \"focusTriggerAfterClose\", \"visible\", \"width\"]);\n  const prefixCls = getPrefixCls('modal', customizePrefixCls);\n  const rootPrefixCls = getPrefixCls();\n  // Style\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const wrapClassNameExtended = classNames(wrapClassName, {\n    [`${prefixCls}-centered`]: !!centered,\n    [`${prefixCls}-wrap-rtl`]: direction === 'rtl'\n  });\n  if (process.env.NODE_ENV !== 'production') {\n    process.env.NODE_ENV !== \"production\" ? warning(!('visible' in props), 'Modal', '`visible` is deprecated, please use `open` instead.') : void 0;\n  }\n  return wrapSSR( /*#__PURE__*/React.createElement(NoCompactStyle, null, /*#__PURE__*/React.createElement(NoFormStyle, {\n    status: true,\n    override: true\n  }, /*#__PURE__*/React.createElement(Dialog, Object.assign({\n    width: width\n  }, restProps, {\n    getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,\n    prefixCls: prefixCls,\n    rootClassName: hashId,\n    wrapClassName: wrapClassNameExtended,\n    footer: renderFooter(Object.assign(Object.assign({}, props), {\n      onOk: handleOk,\n      onCancel: handleCancel\n    })),\n    visible: open !== null && open !== void 0 ? open : visible,\n    mousePosition: (_a = restProps.mousePosition) !== null && _a !== void 0 ? _a : mousePosition,\n    onClose: handleCancel,\n    closeIcon: renderCloseIcon(prefixCls, closeIcon),\n    focusTriggerAfterClose: focusTriggerAfterClose,\n    transitionName: getTransitionName(rootPrefixCls, 'zoom', props.transitionName),\n    maskTransitionName: getTransitionName(rootPrefixCls, 'fade', props.maskTransitionName),\n    className: classNames(hashId, className)\n  })))));\n};\nexport default Modal;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","classNames","Dialog","React","ConfigContext","NoFormStyle","NoCompactStyle","getTransitionName","canUseDocElement","warning","renderCloseIcon","renderFooter","useStyle","mousePosition","getClickPosition","x","pageX","y","pageY","setTimeout","document","documentElement","addEventListener","Modal","props","_a","getPopupContainer","getContextPopupContainer","getPrefixCls","direction","useContext","handleCancel","onCancel","handleOk","onOk","process","env","NODE_ENV","prefixCls","customizePrefixCls","className","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose","visible","width","restProps","rootPrefixCls","wrapSSR","hashId","wrapClassNameExtended","createElement","status","override","assign","undefined","rootClassName","footer","onClose","transitionName","maskTransitionName"],"sources":["/data/messenger.client/node_modules/antd/es/modal/Modal.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport Dialog from 'rc-dialog';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { NoFormStyle } from '../form/context';\nimport { NoCompactStyle } from '../space/Compact';\nimport { getTransitionName } from '../_util/motion';\nimport { canUseDocElement } from '../_util/styleChecker';\nimport warning from '../_util/warning';\nimport { renderCloseIcon, renderFooter } from './PurePanel';\nimport useStyle from './style';\nlet mousePosition;\n// ref: https://github.com/ant-design/ant-design/issues/15795\nconst getClickPosition = e => {\n  mousePosition = {\n    x: e.pageX,\n    y: e.pageY\n  };\n  // 100ms 内发生过点击事件，则从点击位置动画展示\n  // 否则直接 zoom 展示\n  // 这样可以兼容非点击方式展开\n  setTimeout(() => {\n    mousePosition = null;\n  }, 100);\n};\n// 只有点击事件支持从鼠标位置动画展开\nif (canUseDocElement()) {\n  document.documentElement.addEventListener('click', getClickPosition, true);\n}\nconst Modal = props => {\n  var _a;\n  const {\n    getPopupContainer: getContextPopupContainer,\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const handleCancel = e => {\n    const {\n      onCancel\n    } = props;\n    onCancel === null || onCancel === void 0 ? void 0 : onCancel(e);\n  };\n  const handleOk = e => {\n    const {\n      onOk\n    } = props;\n    onOk === null || onOk === void 0 ? void 0 : onOk(e);\n  };\n  process.env.NODE_ENV !== \"production\" ? warning(!('visible' in props), 'Modal', `\\`visible\\` will be removed in next major version, please use \\`open\\` instead.`) : void 0;\n  const {\n      prefixCls: customizePrefixCls,\n      className,\n      open,\n      wrapClassName,\n      centered,\n      getContainer,\n      closeIcon,\n      focusTriggerAfterClose = true,\n      // Deprecated\n      visible,\n      width = 520\n    } = props,\n    restProps = __rest(props, [\"prefixCls\", \"className\", \"open\", \"wrapClassName\", \"centered\", \"getContainer\", \"closeIcon\", \"focusTriggerAfterClose\", \"visible\", \"width\"]);\n  const prefixCls = getPrefixCls('modal', customizePrefixCls);\n  const rootPrefixCls = getPrefixCls();\n  // Style\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const wrapClassNameExtended = classNames(wrapClassName, {\n    [`${prefixCls}-centered`]: !!centered,\n    [`${prefixCls}-wrap-rtl`]: direction === 'rtl'\n  });\n  if (process.env.NODE_ENV !== 'production') {\n    process.env.NODE_ENV !== \"production\" ? warning(!('visible' in props), 'Modal', '`visible` is deprecated, please use `open` instead.') : void 0;\n  }\n  return wrapSSR( /*#__PURE__*/React.createElement(NoCompactStyle, null, /*#__PURE__*/React.createElement(NoFormStyle, {\n    status: true,\n    override: true\n  }, /*#__PURE__*/React.createElement(Dialog, Object.assign({\n    width: width\n  }, restProps, {\n    getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,\n    prefixCls: prefixCls,\n    rootClassName: hashId,\n    wrapClassName: wrapClassNameExtended,\n    footer: renderFooter(Object.assign(Object.assign({}, props), {\n      onOk: handleOk,\n      onCancel: handleCancel\n    })),\n    visible: open !== null && open !== void 0 ? open : visible,\n    mousePosition: (_a = restProps.mousePosition) !== null && _a !== void 0 ? _a : mousePosition,\n    onClose: handleCancel,\n    closeIcon: renderCloseIcon(prefixCls, closeIcon),\n    focusTriggerAfterClose: focusTriggerAfterClose,\n    transitionName: getTransitionName(rootPrefixCls, 'zoom', props.transitionName),\n    maskTransitionName: getTransitionName(rootPrefixCls, 'fade', props.maskTransitionName),\n    className: classNames(hashId, className)\n  })))));\n};\nexport default Modal;"],"mappings":"AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CAAC,CAACC,CAAC,CAACO,CAAC,CAAC,CAAC,GAAGV,CAAC,CAACG,CAAC,CAACO,CAAC,CAA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